package com.hemaapp.yjnh.view;

import android.app.Activity;
import android.content.Context;
import android.support.v4.app.Fragment;

import com.hemaapp.hm_FrameWork.HemaImageWay;
import com.hemaapp.yjnh.utils.PermissionUtils;

/**
 * 类描述：
 * 创建人：GuiyouZhang
 * 创建时间：2017/1/20 12:43
 * 修改备注：
 */
public class YjnhImageWay extends HemaImageWay {

    private Context mContext;

    public YjnhImageWay(Activity context, int albumRequestCode, int cameraRequestCode) {
        super(context, albumRequestCode, cameraRequestCode);
        mContext = context;
    }

    public YjnhImageWay(Fragment fragment, int albumRequestCode, int cameraRequestCode) {
        super(fragment, albumRequestCode, cameraRequestCode);
        mContext = fragment.getActivity();
    }

    public void camera() {
        if (PermissionUtils.checkCamera(mContext))
            super.camera();
    }

}
